<!--
  ~
  ~   Copyright 2016 Walmart Technology
  ~
  ~   Licensed under the Apache License, Version 2.0 (the "License");
  ~   you may not use this file except in compliance with the License.
  ~   You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~   Unless required by applicable law or agreed to in writing, software
  ~   distributed under the License is distributed on an "AS IS" BASIS,
  ~   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~   See the License for the specific language governing permissions and
  ~   limitations under the License.
  ~
  -->

<html xmlns:th="http://www.thymeleaf.org">
<head>
    <link rel="stylesheet"
          href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
          integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"
          crossorigin="anonymous"/>
</head>
<body>
<div>
    <nav class="navbar navbar-inverse">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="#/"><strong class="text-danger lead">Distributed Gatling</strong></a>
            </div>
            <ul class="nav navbar-nav">
                <li class="active"><a href="/">Home</a></li>
                <li><a href="/#/cluster">Cluster</a></li>
                <li><a href="/#/job">Job</a></li>
                <li><a href="/#/tracker">Job Tracker</a></li>
                <li><a href="/#/report">Report</a></li>
                <li><a href="/upload">Repository</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
                <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
            </ul>
        </div>
    </nav>
    <div class="alert alert-info" role="alert" ></div>
</div>
<div class="container" th:if="${message}">
    <h2 th:text="${message}"/>
    <a th:href="${link}" > Upload status</a>
</div>

<div class="container">

    <form method="POST" enctype="multipart/form-data" action="/upload" role="form"
          class="form-horizontal">
        <div class="form-group">
            <div class="col-xs-4">
                <label>File to upload:</label>
                <input type="file" name="file" class="form-control"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-xs-4">
                <label>Name:</label>
                <input type="text" name="name" class="form-control"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-4">
                <label> Project:</label>
                <input type="text" name="role" class="form-control"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-4">
                <label>Name:</label>

                <select name="type" class="form-control">
                    <option value="data">Data</option>
                    <option value="simulations">Simulation</option>
                    <option value="conf">Config</option>
                    <option value="lib">Plugins</option>
                </select>

            </div>
        </div>
        <div class="form-group">
            <input type="submit" value="Upload" class="btn btn-primary"/>
        </div>
    </form>

</div>

<div class="container">
    <ul>
        <li th:each="file : ${files}" th:text="${file}"></li>
    </ul>
</div>
<div class="alert alert-info" role="alert" ></div>
</body>
</html>